namespace UniversalAdmin.Application.Dtos.ArticleCategory;

/// <summary>
/// 文章分类数据传输对象
/// </summary>
public class ArticleCategoryDto
{
    /// <summary>
    /// 分类ID
    /// </summary>
    public Guid Id { get; set; }

    /// <summary>
    /// 分类名称
    /// </summary>
    public string Name { get; set; } = string.Empty;

    /// <summary>
    /// 分类描述
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 父分类ID (null表示根分类)
    /// </summary>
    public Guid? ParentId { get; set; }

    /// <summary>
    /// 排序值 (数值越小排序越靠前)
    /// </summary>
    public int Sort { get; set; } = 0;

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreatedTime { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime UpdatedTime { get; set; }

    /// <summary>
    /// 父分类名称 (导航属性)
    /// </summary>
    public string? ParentName { get; set; }

    /// <summary>
    /// 子分类列表 (树形结构使用)
    /// </summary>
    public List<ArticleCategoryDto> Children { get; set; } = new List<ArticleCategoryDto>();

    /// <summary>
    /// 该分类下的文章数量
    /// </summary>
    public int ArticleCount { get; set; }
}
